package ExamLab.Test2;

import java.io.*;

import ExamLab.Test1.AC;

class AAAA implements Serializable {

	public transient int a = 1;
	public volatile int b = 1;
	public static int c = 1;

}

public class SerializationDemo {

	public static void main(String args[]) throws Exception {
		AAAA oba1 = new AAAA();
		oba1.a = 2;
		oba1.b = 3;
		oba1.c = 4;
		
		new ObjectOutputStream(new FileOutputStream("DD.ser")).writeObject(oba1);
		AAAA oba2 = (AAAA) new ObjectInputStream(new FileInputStream("DD.ser")).readObject();
		System.out.print(oba2.a + oba2.b + oba2.c);
		
		/*saveObj(oba1,"DD.ser"); 
		A oba2=(A)openObj("DD.ser");
		System.out.print(oba2.a + oba2.b + oba2.c);*/
		 
	}
}